package com.zg.scf.service.impl;


import com.zg.common.core.dao.scf.entity.ImgConditionScore;
import com.zg.common.core.dao.scf.ImgConditionScoreDao;
import com.zg.common.core.service.PageBaseService;
import com.zg.scf.service.ImgConditionScoreService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

/**
 * <p>Description: </p>
 *
 * @author zhanfeng.liang
 * @since 2025/5/22 10:47
 */



@Service
@Slf4j
public class ImgConditionScoreServiceImpl extends PageBaseService<ImgConditionScore, ImgConditionScoreDao> implements ImgConditionScoreService {

    public  ImgConditionScore  add(Long categoryId, Long companyId, Long targetCompanyId, BigDecimal score){
        ImgConditionScore imgConditionScore = new ImgConditionScore();
        imgConditionScore.setCategoryId(categoryId);
        imgConditionScore.setCompanyId(companyId);
        imgConditionScore.setTargetCompanyId(targetCompanyId);
        imgConditionScore.setScore(score);
        baseDao.save(imgConditionScore);
        return imgConditionScore;
    }
}
